#include "esp_err.h"
#include "esp_log.h"
#include "lvgl.h"
#include "lvgl_disp_port.h"
#include "lvgl_indev_port.h"
#include "lv_fs_if.h"
#include "app.h"
#include "fastscan.h"
#include "ntp_time.h"
#include "get_weather.h"
extern TaskHandle_t weather_task_handle;

void app_main(void)
{
    //联网初始化天气时间
    wifi_init();
    wifi_start();
    vTaskDelay(10000 / portTICK_PERIOD_MS);
    xTaskCreatePinnedToCore(weather_task, "weather_task", 3072, NULL,3,NULL, 1);
    xTaskCreatePinnedToCore(sntp_task, "sntp_task", 2048, NULL, 1, NULL, 0);
    vTaskDelay(5000 / portTICK_PERIOD_MS);
    wifi_stop();

    #if 1
    /* 1.LVGL内核、显示、输入和文件系统初始化 */
    lv_init();
    lv_port_disp_init();
    lv_port_indev_init();
    lv_fs_if_init();
    
    /* 2.app demo */
    gui_demo();

    /* 3.任务创建 */
    input_task_create();
    disp_task_create();
    #endif
}


